# File: Oportunidade.py
"""\
Oportunidade de trabalho que empresas ou instituicoes oferecem a comunidade.

"""
# Copyright (c) 2005 by TcheZope.org
# Generator: ArchGenXML Version 1.4 devel 4 http://sf.net/projects/archetypes/
#
# GNU General Public Licence (GPL)
# 
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA  02111-1307  USA
#
__author__  = '''Fabiano Weimar dos Santos <xiru@xiru.org>, Jean Rodrigo Ferri
<jeanrodrigoferri@yahoogroups.com>, Rafahela Bazzanella
<rafabazzanella@yahoo.com.br>'''
__docformat__ = 'plaintext'

from AccessControl import ClassSecurityInfo
from Products.Archetypes.atapi import *

from Divulgacao import Divulgacao


# additional imports from tagged value 'import'
from DateTime import DateTime

from Products.PloneZopista.config import *
##code-section module-header #fill in your manual code here
##/code-section module-header

schema= Schema((
    DateTimeField('data_inicio',
        widget=CalendarWidget(
            label="Data de Inicio",
            description="Informe a data em que entra em vigor esta oportunidade.",
            label_msgid='PloneZopista_label_data_inicio',
            description_msgid='PloneZopista_help_data_inicio',
            i18n_domain='PloneZopista',
        ),
        languageIndependent=True,
        accessor="start",
        default_method=DateTime,
    ),
    
    DateTimeField('data_termino',
        widget=CalendarWidget(
            label="Data de Termino",
            description="Informe a data em que expira esta oportunidade.",
            label_msgid='PloneZopista_label_data_termino',
            description_msgid='PloneZopista_help_data_termino',
            i18n_domain='PloneZopista',
        ),
        languageIndependent=True,
        accessor="end",
        default_method=DateTime,
    ),
    
),
)


##code-section after-schema #fill in your manual code here
##/code-section after-schema

class Oportunidade(Divulgacao,BaseContent):
    """
    Oportunidade de trabalho que empresas ou instituicoes oferecem a
    comunidade.
    """
    security = ClassSecurityInfo()
    __implements__ = (getattr(Divulgacao,'__implements__',()),) + (getattr(BaseContent,'__implements__',()),)


    # This name appears in the 'add' box
    archetype_name             = 'Oportunidade'

    meta_type    = 'Oportunidade' 
    portal_type  = 'Oportunidade' 
    allowed_content_types      = [] + list(getattr(Divulgacao, 'allowed_content_types', []))
    filter_content_types       = 0
    global_allow               = 0
    allow_discussion           = 0
    content_icon               = 'oportunidade_icon.gif'
    immediate_view             = 'base_view'
    default_view               = 'base_view'
    typeDescription            = "Oportunidade"
    typeDescMsgId              = 'description_edit_oportunidade'

    schema = BaseSchema + \
             getattr(Divulgacao,'schema',Schema(())) + \
             schema

    ##code-section class-header #fill in your manual code here
    ##/code-section class-header


    #Methods

registerType(Oportunidade,PROJECTNAME)
# end of class Oportunidade

##code-section module-footer #fill in your manual code here
##/code-section module-footer



